/**
 * @describe 全局数据数据存储
 * @author 游金宇(KM)
 * @date 2022-12-28 15:10:13
 */

import { BaseStore } from "../BaseStore";
import { enumToJson } from "@bufbuild/protobuf";


/**自定义平台 (用于引擎无法识别的平台))*/
export enum CustomPlatform {
    /**带带 */
    DaiDaiH5,
    /**随乐游 */
    SuiLeYoo,
    /**易起游 */
    YiQIYoo,
}

export enum GameVisiable {
    SHOW,
    HIDE
}
export default class GlobalStore extends BaseStore {
    /**自定义渠道 虎扑等等 TODO*/
    customPlatform: CustomPlatform | null = CustomPlatform.YiQIYoo

    /**渠道 虎扑渠道*/
    channel: string = '';

    /**feature */
    social_game_feature: 'daidai' | 'suileyoo' | 'yiqiyoo' | '1yiqiyoo' = 'yiqiyoo'

    /**社交游戏id */
    social_game_id = 'shark'

    /**游戏结束时间 */
    local_gameend_time = `${this.social_game_id}_game_end_time`

    /**HTTP服务器时间差 */
    diffServerTimer: number = 0;

    /**ws服务器时间差 */
    ws_diff_server_timer: number = 0;

    pixelRatio: number = 1

    titleBarHeight: number = 0

    /**appid */
    appId: string = ''

    // EVENT_HIDE 时间
    hideTime: number = 0;

    // EVENT_SHOW 时间
    showTime: number = 0;

    /**前后台 */
    gameVisiable: GameVisiable = GameVisiable.SHOW

}
